<?php foreach ($books as $id => $book): ?>
-
  id: <?php echo $id ?>

<?php foreach ($book as $key => $value): ?>
  <?php echo $key ?>: <?php echo sfYaml::dump($value) ?>

<?php endforeach ?>
<?php endforeach ?>